adTempus API
|
Gets all objects for a given class.
HRESULT GetObjectsForClass(ClassIDEnum CID, [out,retval] IADTObjects** objects);
GetObjectsForClass(ClassIDEnum CID, [out,retval] IADTObjects* objects);
Sub GetObjectsForClass(CID As ClassIDEnum, objects As [out,retval] IADTObjects*)
Parameters |
Description |
[in] ClassIDEnum CID |
The CID of the class you want to retrive objects for. |
[out,retval] IADTObjects** objects |
On return, contains a collection of all objects for the class. |
Many objects are not meant to be directly retrieved. If you attempt to retrieve one of these objects, the method will return an empty collection. This applies to most objects that are not descended from IADTIndependentObject. For example, a JobStep object cannot be directly retrieved; you must obtain it from the Steps collection of the Job that owns it.
GetObjectsForClass returns all objects for the class regardless of what permissions you do or do not have for those objects. Before attempting to use an object from the collection, use its CanPerform method to make sure you have the appropriate permission, or your operation will fail.
For example, if you are building a user interface that lists jobs for the user to edit, you should check each job returned by the method and only list those for which the user as at least saView permission.
adTempus API Reference version 3.0.0.0, revised 10/30/2008
|